from __future__ import absolute_import

import logging
from forest.tools.system.execute import run
from forest.registry import register_tool
from forest.tool import Tool
      
@register_tool('system.sgdisk')
def sgdisk(dev):
    ''' wipes gpt status
    '''
    Tool.SIGNAL_TOOL_START(sgdisk, level=logging.DEBUG, message='sgdisk /dev/%s -o' % (dev))
    
    args = ['sgdisk', '-o', dev]
    run(args)
